package com.example.io.fileinputstream;

import java.io.FileInputStream;
import java.io.IOException;

/**
 * @Author 尚智江
 * @description
 * @CreateDate 2024/1/8 23:04
 */
public class ByteStreamByIn2 {
    public static void main(String[] args) throws IOException {
        /*
        字节流输入循环读取

         */
        FileInputStream fileInputStream = new FileInputStream("E:\\SpringBoot\\spring-boot-demo\\java-io\\src\\main\\resources\\a.txt");
        // 循环读取
        int b;
        while ((b = fileInputStream.read()) != -1){
            System.out.println((char) b);
        }

        fileInputStream.close();
    }
}
